<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
  <!-- Title and other stuffs -->
  <title>登录信息管理</title> 
  <meta name="keywords" content="" />
  <meta name="publishIp" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="author" content="">
  <!-- Stylesheets -->
  <link href="/EMS/style/bootstrap.css" rel="stylesheet">
  <!-- Font awesome icon -->
  <link rel="stylesheet" href="/EMS/style/font-awesome.css"> 
  <!-- jQuery UI -->
  <link rel="stylesheet" href="/EMS/style/jquery-ui.css"> 
  <!-- Calendar -->
  <link rel="stylesheet" href="/EMS/style/fullcalendar.css">
  <!-- prettyPhoto -->
  <link rel="stylesheet" href="/EMS/style/prettyPhoto.css">  
  <!-- Star rating -->
  <link rel="stylesheet" href="/EMS/style/rateit.css">
  <!-- Date picker -->
  <link rel="stylesheet" href="/EMS/style/bootstrap-datetimepicker.min.css">
  <!-- CLEditor -->
  <link rel="stylesheet" href="/EMS/style/jquery.cleditor.css"> 
  <!-- Uniform -->
  <link rel="stylesheet" href="/EMS/style/uniform.default.css"> 
  <!-- Bootstrap toggle -->
  <link rel="stylesheet" href="/EMS/style/bootstrap-switch.css">
  <!-- Main stylesheet -->
  <link href="/EMS/style/style.css" rel="stylesheet">
  <!-- Widgets stylesheet -->
  <link href="/EMS/style/widgets.css" rel="stylesheet">   
  
  <!-- HTML5 Support for IE -->
  <!--[if lt IE 9]>
  <script src="js/html5shim.js"></script>
  <![endif]-->

  <!-- Favicon -->
  <link rel="shortcut icon" href="/EMS/img/favicon/favicon.png">
</head>

<body onload="myLoad()">

<%@include file="/header.jsp" %>

<!-- Main content starts -->

<%@include file="/admin/adminSidebar.jsp" %>

  	  	<!-- Main bar -->
  	<div class="mainbar">
      
	    <!-- Page heading -->
	    <div class="page-head">
	      <h2 class="pull-left"><i class="icon-home"></i> 登录信息管理</h2>

        <!-- Breadcrumb -->
        <div class="bread-crumb pull-right">
          <a href="/AdminMainServlet"><i class="icon-home"></i> 首页</a> 
          <!-- Divider -->
          <span class="divider">/</span> 
          <a href="#" class="bread-current">控制台</a>
        </div>

        <div class="clearfix"></div>

	    </div>
	    <!-- Page heading ends -->



	    <!-- Matter -->

	    <div class="matter">
        <div class="container">


          <div class="row">

         <!-- Form starts.  -->
         <form class="form-horizontal" role="form" id="frmMessage"
           action="/EMS/admin/ManageLoginsServlet" method="post" >
              
           <input type="hidden" id="hidOperateType" name="hidOperateType" value=""/><!--隐藏表单域 带参数，传参数（隐藏的） -->
           <input type="hidden" id="hidLoginId" name="hidLoginId" 
           value="${requestScope.ModifyLogin.loginId}"/><!--隐藏表单域 带参数，传参数（隐藏的）不冲突 -->
           <input type="hidden" id="hidCurrentPageIndex" name="hidCurrentPageIndex" 
           value="${currentPageIndex}"/>
           <input type="hidden" id="hidPageSize" name="hidPageSize" value="${pageSize}"/>
           <input type="hidden" id="hidSortField" name="hidSortField" value="${sortField}"/>
           <input type="hidden" id="hidSortString" name="hidSortString" value="${sortString}"/>
           
                  
           
           <div class="col-md-12">

             <div class="widget wgreen" <c:if test="${empty requestScope.ModifyLogin}">style="display: none;"</c:if>>
               <div class="widget-head" >
                 <div class="pull-left" >修改登录信息</div>
                 <div class="widget-icons pull-right">
	               <a href="#" class="wminimize"><i class="icon-chevron-down"></i></a> 
	               <a href="#" class="wclose"><i class="icon-remove"></i></a>
            	 </div>
             	 <div class="clearfix"></div>
          	   </div>

          	   <div class="widget-content"  <c:if test="${empty requestScope.ModifyLogin}">style="display: none;"</c:if>>
                 <div class="padd">
                    <div class="form-group">
                      <label class="col-lg-4 control-label">登录名</label>
                      <div class="col-lg-8">
                        <div type="text" class="form-control" id="txtTitle" name="txtLoginName" 
                        placeholder="标题" >${requestScope.ModifyLogin.loginName}</div>
                        <span class="label label-danger" id="spanTitle"></span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-lg-4 control-label">Email</label>
                      <div class="col-lg-8">
                        <div class="form-control" rows="3" id="txtContent" name="txtEmail"
                         >${requestScope.ModifyLogin.email}</div>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-lg-4 control-label">部门</label>
                      <div class="col-lg-8">
                        <select class="form-control" id="txtDepartmentName" name="txtDepartmentId">
						<c:forEach items="${departments}" var="department">
	                  		<option value="${department.departmentId}">${department.departmentName}</option>
	                 	</c:forEach>
	                 	</select>
                      </div>
                    </div>    
                    <div class="form-group">
                      <label class="col-lg-4 control-label">登录类型</label>
                      <div class="col-lg-8">
                        <select class="form-control" id="txtDepartmentStype" name="txtTypeId">
						<c:forEach items="${types}" var="type">
	                  		<option value="${type.loginTypeId}">${type.loginTypeName}</option>
	                 	</c:forEach>
	                 	</select>
                      </div>
                    </div>
                     <div class="form-group">
                      <label class="col-lg-4 control-label">登录状态</label>
                      <div class="col-lg-8">
                        <select class="form-control" id="txtDepartmentState" name="txtStateId">
						<c:forEach items="${states}" var="state">
	                  		<option value="${state.loginStateId}">${state.loginStateName}</option>
	                 	</c:forEach>
	                 	</select>
                      </div>
                    </div>
                    <hr />
                    <div class="form-group">
                      <div class="col-lg-offset-1 col-lg-9">
	                        <button class="btn btn-primary"  onclick="saveMessage()">保存</button>                             
	                        <button class="btn btn-default" onclick="cancelSaveMessage()">取消保存</button>
                      </div>
                    </div>
	             </div>
	           </div>
	           <div class="widget-foot">
	               <!-- Footer goes here -->
	             </div>
	         </div>  
	         
			 <div class="widget wgreen">
               <div class="widget-head">
                 <div class="pull-left">查询登录信息</div>
                 <div class="widget-icons pull-right">
	               <a href="#" class="wminimize"><i class="icon-chevron-down"></i></a> 
	               <a href="#" class="wclose"><i class="icon-remove"></i></a>
            	 </div>
             	 <div class="clearfix"></div>
          	   </div>

          	   <div class="widget-content" style="display: none;">
                 <div class="padd">
                    <div class="form-group">
                      <label class="col-lg-4 control-label">登录名</label>
                      <div class="col-lg-8">
                        <input type="text" class="form-control" id="txtSearchTitle" name="txtSearchLoginName" 
                        placeholder="标题" value="${searcher.loginName}"/>
                        <span class="label label-danger" id="spanSearch"></span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-lg-4 control-label">昵称</label>
                      <div class="col-lg-8">
                        <textarea class="form-control" rows="3" id="txtSearchContent" name="txtSearchNickname" 
                        placeholder="内容">${searcher.nickname}</textarea>
                      </div>
                    </div>
                   <div class="form-group">
                      <label class="col-lg-4 control-label">注册时间</label>
                      <div class="col-lg-8">
                        <input type="text" class="form-control" id="txtSearchPublishDateTimeBegin" name="txtSearchRegisterDateTimeBegin" 
                        placeholder="开始时间" value="${searcher.registerDateTimeBegin}"/>
                        <input type="text" class="form-control" id="txtSearchPublishDateTimeEnd" name="txtSearchRegisterDateTimeEnd" 
                        placeholder="结束时间" value="${searcher.registerDateTimeEnd}"/>
                        <span class="label label-danger" id="spanSearch"></span>
                      </div>
                      </div>
                      <div class="form-group">
                      <label class="col-lg-4 control-label">登录时间</label>
                      <div class="col-lg-8">
                        <input type="text" class="form-control" id="txtSearchPublishDateTimeBegin" name="txtSearchLastLoginDateTimeBegin" 
                        placeholder="开始时间" value="${searcher.lastLoginDateTimeBegin}"/>
                        <input type="text" class="form-control" id="txtSearchPublishDateTimeEnd" name="txtSearchRegisterDateTimeEnd" 
                        placeholder="结束时间" value="${searcher.lastLoginDateTimeEnd}"/>
                        <span class="label label-danger" id="spanSearch"></span>
                      </div>
                    </div>
                    <div class="form-group">
                      <label class="col-lg-4 control-label">部门</label>
                      <div class="col-lg-8">
                        <select class="form-control" id="txtSearchDepartmentName" name="txtSearchDepartmentName">
                          <option value="">请选择部门名称</option>
                        <c:forEach items="${departments}" var="department">
	                  		<option value="${department.departmentName}">${department.departmentName}</option>
	                 	</c:forEach>
	                 	</select>
                      </div>
                    </div>
                    <hr />
                    <div class="form-group">
                      <div class="col-lg-offset-1 col-lg-9">
                        <button class="btn btn-primary" type="reset" onclick="searchMessage()">查询</button>                             
                        <button class="btn btn-default" type="reset" onclick="cancelSearchMessage()">取消查询</button>
                      </div>
                    </div>
	             </div>
	           </div>
	           <div class="widget-foot">
	               <!-- Footer goes here -->
	             </div>
	         </div>  
	
	       </div>
	
		 </form>
	     </div>


       <!-- Table -->
         <div class="row">
           <div class="col-md-12">
             <div class="widget">
             <div class="widget-head">
               <div class="pull-left">登录信息表</div>
               <div class="widget-icons pull-right">
                 <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
                 <a href="#" class="wclose"><i class="icon-remove"></i></a>
               </div>  
               <div class="clearfix"></div>
             </div>

               <div class="widget-content">

                 <table class="table table-striped table-bordered table-hover">
                   <thead>
                     <tr>
                       <th><a href="javascript: sorting('LoginId')">序号</a></th>
                       <th><a href="javascript: sorting('LoginName')">登录名</a></th>
                       <th><a href="javascript: sorting('Email')">Email</a></th>
                       <th><a href="javascript: sorting('Nickname')">昵称</a></th>
                       <th><a href="javascript: sorting('LoginTime')">登录次数</a></th>
                       <th><a href="javascript: sorting('Grade')">等级</a></th>
                        <th><a href="javascript: sorting('RegisterDateTime')">注册时间</a></th>
                       <th><a href="javascript: sorting('RegisterIp')">注册IP</a></th>
                       <th><a href="javascript: sorting('LastLoginDateTime')">最后登录时间</a></th>
                       <th><a href="javascript: sorting('LastLoginIp')">最后登录IP</a></th>
                       <th><a href="javascript: sorting('StateId')">登录状态</a></th>
                       <th><a href="javascript: sorting('TypeId')">登录类型</a></th>
                       <th><a href="javascript: sorting('DepartmentId')">部门</a></th>
                       <th>操作</th>
                     </tr>
                   </thead>
                   <tbody>
                     <c:forEach items="${logins}" var="login" 
                     begin="${(currentPageIndex - 1) * pageSize}" end="${currentPageIndex * pageSize - 1}">
                     <!-- 都从0开始计数，所以公式都减1 -->
                     
                     <tr>
                       <td>${login.loginId} </td>
                       <td>${login.loginName}</td>
                       <td>${login.email}</td>
                       <td>${login.nickname}</td>
                       <td>${login.loginTime}</td>
                       <td>${login.grade}</td>
                       <td>${login.registerDateTime} </td>
                       <td>${login.registerIp}</td>
                       <td>${login.lastLoginDateTime}</td>
                       <td>${login.lastLoginIp}</td>
                       <td>${login.loginState.loginStateName}</td>
                       <td>${login.loginType.loginTypeName}</td>
                       <td>${login.department.departmentName}</td>
                       
                       <td>
                           <button class="btn btn-xs btn-warning" onclick="modifyMessage(${login.loginId})"><i class="icon-pencil"></i> </button>
                           <button class="btn btn-xs btn-danger" onclick="removeMessage(${login.loginId})"><i class="icon-remove"></i> </button>                          
                       </td>
                     </tr>    
                     
                     </c:forEach>                       
                                        
                   </tbody>
                 </table>

                 <div class="widget-foot">
                 共${rowCount}条数据&nbsp;&nbsp;&nbsp;第${currentPageIndex}/${pageCount}页
                   
                 <%-- <ul class="pagination pull-left">
                 	<li ><a>共${rowCount}条数据&nbsp;&nbsp;&nbsp;第${currentPageIndex}/${pageCount}页</a></li>
                 	<li ><a>每页
                 	<select id="resize" onchange="resize()">
					<option value="">${pageSize}</option>
                  		<option value="2">2</option>
                 		<option value="3">3</option>
                 		<option value="5">5</option>
                 	</select>
                 	记录</a></li>
				</ul> --%>
                     <label>
                       <input type="radio" name="radPagrSize" value="2" onclick="resize(this.value)" <c:if test="${pageSize == 2}">checked</c:if> >2条/页<!-- this.value表示的是value=2 -->
                     </label>&nbsp;&nbsp;&nbsp;
                     <label>
                       <input type="radio" name="radPagrSize" value="3" onclick="resize(this.value)" <c:if test="${pageSize == 3}">checked</c:if>>3条/页
                     </label>&nbsp;&nbsp;&nbsp;
                     <label>
                       <input type="radio" name="radPagrSize" value="5" onclick="resize(this.value)" <c:if test="${pageSize == 5}">checked</c:if>>5条/页
                     </label>
                     <ul class="pagination pull-right">
                     <c:if test="${currentPageIndex <= 1}">
                      <li><a>首页</a></li>
                       <li><a>上一页</a></li>
                     </c:if>
                     <c:if test="${currentPageIndex > 1}">
                       <li><a href="javascript: paging(1)">首页</a></li>
                       <li><a href="javascript: paging(${currentPageIndex - 1})">上一页</a></li>
                     </c:if>
                      
                     <c:if test="${currentPageIndex >= pageCount}">
                       <li><a>下一页</a></li>
                       <li><a>尾页</a></li>
                     </c:if>
                       
                     <c:if test="${currentPageIndex < pageCount}">
                       <li><a href="javascript: paging(${currentPageIndex + 1})">下一页</a></li>
                       <li><a href="javascript: paging(${pageCount})">尾页</a></li>
                     </c:if>
                     <li><a target="_blank" href="/EMS/admin/ExportAllMessagesServlet">导出全部</a></li>
                     <li><a target="_blank" href="/EMS/admin/ExportMessagesServlet">导出</a></li>
                     </ul>                    
                   <div class="clearfix"></div> 
                 </div>
               </div>
             </div>
           </div>
         </div>
    </div>	
    
    	<!-- Matter ends -->

 </div>

   <!-- Mainbar ends -->
   <div class="clearfix"></div>

</div>
<!-- Content ends -->

<%@include file="/footer.jsp" %>


<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span> 

<!-- JS -->
<script src="/EMS/js/jquery.js"></script> <!-- jQuery -->
<script src="/EMS/js/bootstrap.js"></script> <!-- Bootstrap -->
<script src="/EMS/js/jquery-ui-1.9.2.custom.min.js"></script> <!-- jQuery UI -->
<script src="/EMS/js/fullcalendar.min.js"></script> <!-- Full Google Calendar - Calendar -->
<script src="/EMS/js/jquery.rateit.min.js"></script> <!-- RateIt - Star rating -->
<script src="/EMS/js/jquery.prettyPhoto.js"></script> <!-- prettyPhoto -->

<!-- jQuery Flot -->
<script src="/EMS/js/excanvas.min.js"></script>
<script src="/EMS/js/jquery.flot.js"></script>
<script src="/EMS/js/jquery.flot.resize.js"></script>
<script src="/EMS/js/jquery.flot.pie.js"></script>
<script src="/EMS/js/jquery.flot.stack.js"></script>

<!-- jQuery Notification - Noty -->
<script src="/EMS/js/jquery.noty.js"></script> <!-- jQuery Notify -->
<script src="/EMS/js/themes/default.js"></script> <!-- jQuery Notify -->
<script src="/EMS/js/layouts/bottom.js"></script> <!-- jQuery Notify -->
<script src="/EMS/js/layouts/topRight.js"></script> <!-- jQuery Notify -->
<script src="/EMS/js/layouts/top.js"></script> <!-- jQuery Notify -->
<!-- jQuery Notification ends -->

<script src="/EMS/js/sparklines.js"></script> <!-- Sparklines -->
<script src="/EMS/js/jquery.cleditor.min.js"></script> <!-- CLEditor -->
<script src="/EMS/js/bootstrap-datetimepicker.min.js"></script> <!-- Date picker -->
<script src="/EMS/js/jquery.uniform.min.js"></script> <!-- jQuery Uniform -->
<script src="/EMS/js/bootstrap-switch.min.js"></script> <!-- Bootstrap Toggle -->
<script src="/EMS/js/filter.js"></script> <!-- Filter for support page -->
<script src="/EMS/js/custom.js"></script> <!-- Custom codes -->
<script src="/EMS/js/charts.js"></script> <!-- Charts & Graphs -->

<!-- Script for this page -->
<script type="text/javascript">
$(function () {

    /* Bar Chart starts */


	/* var province_1 = {$vo.my_status};
			$("#select1 option[value='"+province_1+"']").attr("selected",true); */
    var d1 = [];
    for (var i = 0; i <= 20; i += 1)
        d1.push([i, parseInt(Math.random() * 30)]);

    var d2 = [];
    for (var i = 0; i <= 20; i += 1)
        d2.push([i, parseInt(Math.random() * 30)]);


    var stack = 0, bars = true, lines = false, steps = false;
    
    function plotWithOptions() {//这个就是那个出错的函数
        $.plot($("#bar-chart"), [ d1, d2 ], {//这句话出现了错误   .plot方法不存在。
            series: {
                stack: stack,
                lines: { show: lines, fill: true, steps: steps },
                bars: { show: bars, barWidth: 0.8 }
            },
            grid: {
                borderWidth: 0, hoverable: true, color: "#777"
            },
            colors: ["#ff6c24", "#ff2424"],
            bars: {
                  show: true,
                  lineWidth: 0,
                  fill: true,
                  fillColor: { colors: [ { opacity: 0.9 }, { opacity: 0.8 } ] }
            }
        });
    }

     //plotWithOptions();  // 这句话是有问题的    它在控制台报了错误  
    
    $(".stackControls input").click(function (e) {
        e.preventDefault();
        stack = $(this).val() == "With stacking" ? true : null;
        plotWithOptions();
    });
    $(".graphControls input").click(function (e) {
        e.preventDefault();
        bars = $(this).val().indexOf("Bars") != -1;
        lines = $(this).val().indexOf("Lines") != -1;
        steps = $(this).val().indexOf("steps") != -1;
        plotWithOptions();
    });

    /* Bar chart ends */

});


/* Curve chart starts */

$(function () {
		

	//$("#resize option[value='${pageSize}']").attr('selected', true);


    var sin = [], cos = [];
    for (var i = 0; i < 14; i += 0.5) {
        sin.push([i, Math.sin(i)]);
        cos.push([i, Math.cos(i)]);
    }

    var plot = $.plot($("#curve-chart"),
           [ { data: sin, label: "sin(x)"}, { data: cos, label: "cos(x)" } ], {
               series: {
                   lines: { show: true, fill: true},
                   points: { show: true }
               },
               grid: { hoverable: true, clickable: true, borderWidth:0 },
               yaxis: { min: -1.2, max: 1.2 },
               colors: ["#1eafed", "#1eafed"]
             });

    function showTooltip(x, y, contents) {
        $('<div id="tooltip">' + contents + '</div>').css( {
            position: 'absolute',
            display: 'none',
            top: y + 5,
            left: x + 5,
            border: '1px solid #000',
            padding: '2px 8px',
            color: '#ccc',
            'background-color': '#000',
            opacity: 0.9
        }).appendTo("body").fadeIn(200);
    }

    var previousPoint = null;
    $("#curve-chart").bind("plothover", function (event, pos, item) {
        $("#x").text(pos.x.toFixed(2));
        $("#y").text(pos.y.toFixed(2));

        if ($("#enableTooltip:checked").length > 0) {
            if (item) {
                if (previousPoint != item.dataIndex) {
                    previousPoint = item.dataIndex;
                    
                    $("#tooltip").remove();
                    var x = item.datapoint[0].toFixed(2),
                        y = item.datapoint[1].toFixed(2);
                    
                    showTooltip(item.pageX, item.pageY, 
                                item.series.label + " of " + x + " = " + y);
                }
            }
            else {
                $("#tooltip").remove();
                previousPoint = null;            
            }
        }
    }); 

    $("#curve-chart").bind("plotclick", function (event, pos, item) {
        if (item) {
            $("#clickdata").text("You clicked point " + item.dataIndex + " in " + item.series.label + ".");
            plot.highlight(item.series, item.datapoint);
        }
    });

});




function checkSearch(){
	var txtSearchTitle = document.getElementById("txtSearchTitle");
	var txtSearchContent = document.getElementById("txtSearchContent");
	var txtSearchPublishDateTimeBegin = document.getElementById("txtSearchPublishDateTimeBegin");
	var txtSearchPublishDateTimeEnd = document.getElementById("txtSearchPublishDateTimeEnd");
	var txtSearchLoginName = document.getElementById("txtSearchLoginName");
	var txtSearchDepartmentName = document.getElementById("txtSearchDepartmentName");
	var spanSearch = document.getElementById("spanSearch");
	if(txtSearchTitle.value.length == 0
	&& txtSearchContent.value.length == 0
	&& txtSearchPublishDateTimeBegin.value.length == 0
	&& txtSearchPublishDateTimeEnd.value.length == 0
	&& txtSearchLoginName.value.length == 0
	&& txtSearchDepartmentName.value.length == 0){
		spanSearch.innerHTML = "查询条件不能为空。";
		return false;
	}
	else{
		spanSearch.innerHTML="";
		return true;
	}
}


function addMessage(){
	if(checkInput()){
		var frmMessage = document.getElementById("frmMessage");
		var hidOperateType = document.getElementById("hidOperateType");//获取表单
		
		hidOperateType.value="add";
		frmMessage.submit();
	}
}

function removeMessage(loginId){
	if(confirm("确定要删除么？")){
		var frmMessage = document.getElementById("frmMessage");
		var hidOperateType = document.getElementById("hidOperateType");
		var hidLoginId = document.getElementById("hidLoginId");

		hidLoginId.value = loginId;
		hidOperateType.value="remove";
		frmMessage.submit();
		//alert(loginId);
	}
}

function modifyMessage(loginId){
		var frmMessage = document.getElementById("frmMessage");
		var hidOperateType = document.getElementById("hidOperateType");
		var hidLoginId = document.getElementById("hidLoginId");

		hidLoginId.value = loginId;
		hidOperateType.value="modify";
		frmMessage.submit();
}

function saveMessage(){
		var frmMessage = document.getElementById("frmMessage");
		var hidOperateType = document.getElementById("hidOperateType");//获取表单
		
		hidOperateType.value="save";
		frmMessage.submit();
	
}

function cancelSaveMessage(){
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");

	hidOperateType.value="cancelSave";
	frmMessage.submit();
}

function paging(pageIndex){
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");
	var hidCurrentPageIndex = document.getElementById("hidCurrentPageIndex");
	
	hidCurrentPageIndex.value = pageIndex;
	hidOperateType.value="paging";
	frmMessage.submit();
}

function sorting(sortField){
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");
	var hidSortField = document.getElementById("hidSortField");
	
	hidSortField.value = sortField;
	hidOperateType.value="sorting";
	frmMessage.submit();
}



/*function resize(){
	
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");
	var hidPageSize = document.getElementById("hidPageSize");
	var resize = document.getElementById("resize");
	
	hidPageSize.value = resize.value;
	hidOperateType.value="resize";
	//alert(hidPageSize.value);
	frmMessage.submit();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
}*/
function resize(pageSize){
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");
	var hidPageSize = document.getElementById("hidPageSize");
	
	hidPageSize.value = pageSize;
	hidOperateType.value="resize";
	frmMessage.submit();
}

function searchMessage(){
	if(checkSearch()){
		var frmMessage = document.getElementById("frmMessage");
		var hidOperateType = document.getElementById("hidOperateType");//获取表单
		
		hidOperateType.value="search";
		frmMessage.submit();
	}
}

function cancelSearchMessage(){
	var frmMessage = document.getElementById("frmMessage");
	var hidOperateType = document.getElementById("hidOperateType");//获取表单
	var txtSearchPublishDateTimeBegin = document.getElementById("txtSearchPublishDateTimeBegin");
	var txtSearchPublishDateTimeEnd = document.getElementById("txtSearchPublishDateTimeEnd");
	var txtSearchLoginName = document.getElementById("txtSearchLoginName");
	var txtSearchDepartmentName = document.getElementById("txtSearchDepartmentName");
	txtSearchTitle.value = "";
	txtSearchContent.value = "";
	txtSearchPublishDateTimeBegin.value = "";
	txtSearchPublishDateTimeEnd.value = "";
	txtSearchLoginName.value = "";
	txtSearchDepartmentName.value = "";
	hidOperateType.value="cancelSearch";
	frmMessage.submit();
}

function myLoad(){
 ${alertMessage}
}
/* Curve chart ends */
</script>

</body>
</html>